Skip to content

fix: prevent minor changeset from producing major bump in fixed group#831

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-minor-version-bump
Feb 28, 2026
Merged

fix: prevent minor changeset from producing major bump in fixed group#831
hotlong merged 2 commits intomainfrom
copilot/fix-minor-version-bump

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

A minor changeset for @objectstack/spec produced a 4.0.0 release PR instead of 3.1.0. Root cause: workspace:* peer deps resolve to exact versions in changesets, and the default onlyUpdatePeerDependentsWhenOutOfRange: false treats any non-patch peer dep bump as breaking — cascading a major through the entire fixed group.

Changes

  • .changeset/config.json — Enable onlyUpdatePeerDependentsWhenOutOfRange: true so peer dep bumps only trigger major when the new version actually leaves the compatible range
  • 10 package.json files — Change internal workspace:*workspace:^ in peerDependencies so minor bumps stay within ^x.y.z range

Affected packages

@objectstack/cli, all 7 adapter packages, plugin-dev, plugin-msw

Verification

# Before (onlyUpdatePeerDependentsWhenOutOfRange: false)
@objectstack/spec : 3.0.11 -> major -> 4.0.0

# After
@objectstack/spec : 3.0.11 -> minor -> 3.1.0

Simulated via assembleReleasePlan() directly — all 35 fixed-group packages resolve to 3.1.0.

Original prompt

This section details on the original issue you should resolve

<issue_title>fixed group下minor版本号被错误提升为major,需排查并修正版本发布流程</issue_title>
<issue_description>## 问题简述
在objectstack-ai/spec仓库下,尝试发minor版本的changeset时,实际发布出的PR版本号却是major(4.0.0),而不是预期的minor(3.1.0)。初步分析原因为fixed group机制导致组内某包的状态影响了所有包的bump级别。

待办事项

  • 检查.fixed分组内所有35个包的当前版本号,确保全为3.0.11
  • 检查.changeset目录内是否有残留未消费的major类型changeset
  • 本地执行npx changeset status分析bump计算链路,定位触发major bump的包或changeset
  • 若发现异常,手动修正(如删除多余的changeset或同步版本号)
  • 完成后重新生成release PR,验证minor版号正常

参考链接


处理完毕后,请:

  • 运行测试
  • 更新相关issue
  • 更新ROADMAP.md
  • 如需其他仓库协作,创建cross-repo任务
    </issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-play Ready Ready Preview, Comment Feb 28, 2026 6:34am
spec Ready Ready Preview, Comment Feb 28, 2026 6:34am

Request Review

Root cause: changesets' `onlyUpdatePeerDependentsWhenOutOfRange` defaults to
false, which means ANY non-patch peer dependency bump triggers a major version
bump for dependents. Combined with `workspace:*` (resolved to exact version),
this caused minor bumps to escalate to major across the entire fixed group.

Fix:
1. Add `onlyUpdatePeerDependentsWhenOutOfRange: true` to changeset config
2. Change internal peerDependencies from `workspace:*` to `workspace:^` so
   minor bumps stay within the semver-compatible range

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrect major version bump in release process fix: prevent minor changeset from producing major bump in fixed group Feb 28, 2026
@hotlong hotlong marked this pull request as ready for review February 28, 2026 06:55
Copilot AI review requested due to automatic review settings February 28, 2026 06:55
@hotlong hotlong merged commit fd92981 into main Feb 28, 2026
3 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts Changesets configuration and internal peerDependency ranges to prevent minor bumps from incorrectly escalating to major releases across the repo’s fixed group.

Changes:

  • Enabled Changesets’ onlyUpdatePeerDependentsWhenOutOfRange via ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH to avoid major bumps unless peer ranges are truly violated.
  • Switched internal peerDependencies from workspace:* to workspace:^ in affected packages so published peer ranges remain semver-compatible across minor updates.
  • Updated ROADMAP.md to reflect the release-process fix and current protocol version metadata.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.changeset/config.json Enables peer-dependent bumping behavior only when out of range, preventing fixed-group major cascades.
packages/plugins/plugin-msw/package.json Changes internal runtime peerDependency to workspace:^.
packages/plugins/plugin-dev/package.json Changes internal peerDependencies to workspace:^ to keep ranges compatible on minor bumps.
packages/cli/package.json Changes internal core peerDependency to workspace:^.
packages/adapters/express/package.json Changes internal runtime peerDependency to workspace:^.
packages/adapters/fastify/package.json Changes internal runtime peerDependency to workspace:^.
packages/adapters/hono/package.json Changes internal runtime peerDependency to workspace:^.
packages/adapters/nestjs/package.json Changes internal runtime peerDependency to workspace:^.
packages/adapters/nextjs/package.json Changes internal runtime peerDependency to workspace:^.
packages/adapters/nuxt/package.json Changes internal runtime peerDependency to workspace:^.
packages/adapters/sveltekit/package.json Changes internal runtime peerDependency to workspace:^.
ROADMAP.md Documents the release-process fix and updates the “Last Updated” / “Current Version” fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fixed group下minor版本号被错误提升为major,需排查并修正版本发布流程

3 participants